{% extends "base.html" %}
{% block content %}
<head>
    <title> Financier </title>
    {{ date_form.media }}
    {{ css_media.media }}
</head>
    <body onLoad="select_form(window.document.Choiceform.choices.selectedIndex, data)">
    <script type="text/javascript">
        var data = new Data({{ users_form.users }}, {{ projects_form.projects }},
                            '{{ date_form.initial_date }}',
                            '{{ date_form.end_date }}', '{{ summ1 }}', '{{ summ2 }}', '{{ summ3 }}')
    </script>
    <h3>
        <p> Timesheet: {{ first_name }} {{ last_name }} </p>
    </h3>
    
    <a class="link" href="{% url user %}"> User </a>
    
    <div class="Content">
    
        <form action="" name="Choiceform" id="Choiceform" method="get">
            {{ choice_form.choices }}
        </form>
        
        <br>
        
        <div id="form">
        </div>
        <br>
        <div class="Erros">
            {% if users_form.errors %}
                <ul> Users: {{ users_form.users.errors }} </ul>
            {% endif %}

            {% if projects_form.errors %}
                <ul> Projects: {{ projects_form.projects.errors }} </ul>
            {% endif %}
            
            {% if date_form.errors %}
                <ul> Initial Date: {{ date_form.initial_date.errors }} </ul>
                <ul> Final Date: {{ date_form.end_date.errors }} </ul>
            {% endif %}
        </div>
        
    </div>
    <div class="link">
        <p><a id="logout" href="{% url auth_logout %}">Logout</a></p>
    </div>
    </body>
{% endblock %}